/*
* archdep.c Code that change depending on the microcontroller
* Copyright 2006-2008 OpenWii (admin@openwii.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
*
* Chiip (ATmega8L8) Flavor
* Copyright YOLD 3173 OpenWii all rights reversed.
*
*
* Extra credits go to krall for fixing ATMEGA support
* http://www.openwii.org/forums/viewtopic.php?t=47
*
* Version 2.4 by Andii
*/

#include "archdep.h"

// do anything specefic to this micro
inline void machInit()
{
	// OC1A/OC1B disconnected
	TCCR1A = 0;

	// set timer mode to normal (TCNT1 counts up to 0xFFFF)
	// prescaler = 1
	TCCR1B = _BV(CS10);

	DDRC |= LEDPIN;		// enable PD5 as output

	PORTD|= SW0PIN;		// enable Pullup Resistor on chip
}
